package showtime.framework.engine.animation
{
	
	
	/** 
	 * @project showtime
	 * @author yinhao
	 * @date 2011-5-27
	 *
	 */
	
	public class Animation
	{		
		public var name:String = null;
		
		public var delay:Number = 0;
		
		public var frameRate:Number = 0;
		
		public var frames:Array = null;
				
		/**
		 * Whether or not the animation is looped. 
		 */		
		public var looped:Boolean = false;
		
		
		public function Animation(name:String, frames:Array, frameRate:Number = 0, looped:Boolean = true)
		{
			this.name = name;
			
			if (frameRate > 0)
			{
				delay = 1.0 / frameRate;
			}
			
			this.frameRate = frameRate;
			
			this.frames = frames;
			
			this.looped = looped;
	
		}
		
		public function dispose():void
		{
			frames = null;
		}
	}
}